Skip to content

SourceGenerators: assert diagnostic catalog consistency against AnalyzerReleases - #319

Merged
Skymly merged 3 commits into
mainfrom
cursor/skymly-frontier-automation-e500
Aug 7, 2026
Merged

SourceGenerators: assert diagnostic catalog consistency against AnalyzerReleases#319
Skymly merged 3 commits into
mainfrom
cursor/skymly-frontier-automation-e500

Conversation

@cursor

@cursor cursor Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Add reflection-based tests that keep DiagnosticIds, DesignPatternsDiagnosticDescriptors, and AnalyzerReleases markdown rows in lockstep so new DP### rules cannot drift across registration surfaces.

Claim note: Issue label/assignee updates returned HTTP 403 for this agent token. This open PR is the concurrency claim for #318 (do not rely on agent-working).

Related Issue

Closes #318

Solution module

  • Runtime (DesignPatterns/)
  • Diagnostics (DesignPatterns.Diagnostics/)
  • SourceGenerators (DesignPatterns.SourceGenerators/)
  • Analyzers (DesignPatterns.Analyzers/ + DesignPatterns.CodeFixes/)
  • DependencyInjection (DesignPatterns.Extensions.DependencyInjection/)
  • Package (DesignPatterns.Package/)
  • Docs / Repository (README, docs/, .github/, AGENTS.md, build/)

Type of change

  • Bug fix
  • Feature
  • Source generator / diagnostic / CodeFix change
  • Refactor (no behavior change)
  • Docs / repo metadata only

Test plan

  • ./build.ps1 --target Ci --configuration Release (or CiPack if packaging changed)
  • Sibling samples (if API/generator behavior changed): clone DesignPatterns.Samples beside this repo and run ./build.ps1 --target Ci

Breaking changes

  • None
  • Yes — describe migration steps (APIs may still be pre-stable):

Checklist

  • This PR touches only one solution module (see AGENTS.md)
  • Commit messages are in English (no AI/agent tooling mentions in commits)
  • PR description is English only — no AI/agent/Cursor tool attribution, no auto-generated summary blocks (e.g. CURSOR_SUMMARY, "Made with …")
  • No version bumps, tags, releases, or NuGet publish steps included unless explicitly requested
  • Public API / diagnostic / generated code changes are documented if user-visible

Documentation checklist

  • Design Doc updated if API / diagnostic / implementation changed
  • User-facing docs synced (separate PRs if multi-repo)
  • No documentation changes needed

Changes

  • Embed SourceGenerators Unshipped + Analyzers Shipped/Unshipped AnalyzerReleases markdown as test resources
  • Add DiagnosticCatalogConsistencyTests covering per-id Category/Severity/HelpLink/message checks and set-level id/descriptor/markdown consistency
Open in Web View Automation 

cursoragent and others added 3 commits August 6, 2026 16:07
Enforce DiagnosticIds, descriptors, and AnalyzerReleases markdown stay in
lockstep so new DP### rules cannot drift across registration surfaces.

Co-authored-by: 落笔wys <Skymly@users.noreply.github.com>
Co-authored-by: 落笔wys <Skymly@users.noreply.github.com>
Build CatalogById with GroupBy so duplicate DP### registrations fail the
dedicated uniqueness assertion with a listed diff, not ArgumentException.

Co-authored-by: 落笔wys <Skymly@users.noreply.github.com>
@cursor
cursor Bot marked this pull request as ready for review August 6, 2026 16:10
@Skymly
Skymly merged commit 14de1db into main Aug 7, 2026
5 of 6 checks passed
@Skymly
Skymly deleted the cursor/skymly-frontier-automation-e500 branch August 7, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SourceGenerators: assert diagnostic catalog consistency against AnalyzerReleases

2 participants